<script>
    import base from '../process/index'
    export default {
        extends: base,
        data() {
            return {
                updateOwner:false,
                timeStart: 0,
                actionProto: {
                    name: '执行',
                    icon: 'flash'
                }
            }
        },
        methods: {
            actionTrigger(id, data, index, cb) {
                this.timeStart = new Date()
                return this.actionStart(id, data).finally(() => {
                    //临时处理进行回调
                    if (cb) cb()
                })
            },
            actionSuccess(res) {             
                var time = new Date() - this.timeStart
                this.$Modal.success({
                    title: '执行器执行成功',
                    content: `<h4>执行时间:<span class="text-success">${time}ms</span></h4><p>${res.data}</p>`
                });
            }
        }
    }
</script>
